﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using LinQ_DTO;

namespace BUS
{
    public class UsersInRoleBUS
    {
        public List<aspnet_UsersInRole> LayDanhSach()
        {
            UsersInRoleDAO udao = new UsersInRoleDAO();
            return udao.LayDanhSach(); 
        }

        public aspnet_UsersInRole LayTheoUserId(Guid userId)
        {
            UsersInRoleDAO udao = new UsersInRoleDAO();
            return udao.LayTheoUserId(userId); 

        }

        public aspnet_UsersInRole LayTheoRoleId(Guid roleId)
        {
            UsersInRoleDAO udao = new UsersInRoleDAO();
            return udao.LayTheoRoleId(roleId); 

        }

        public void Them(aspnet_UsersInRole temp)
        {
            UsersInRoleDAO udao = new UsersInRoleDAO();
            udao.Them(temp); 

        }

        public void Xoa(aspnet_UsersInRole temp)
        {

            UsersInRoleDAO udao = new UsersInRoleDAO();
            udao.Xoa(temp); 


        }

        public void CapNhatRoleId(aspnet_UsersInRole temp)
        {
            UsersInRoleDAO udao = new UsersInRoleDAO();
            udao.CapNhatRoleId(temp); 

        }

        public void CapNhatUserId(aspnet_UsersInRole temp)
        {
            UsersInRoleDAO udao = new UsersInRoleDAO();
            udao.CapNhatUserId(temp); 

        }

        /************************************************************************************************************        *                          coder: TRAN KINH LY 
         ***********************************************************************************************************/
        public List<aspnet_UsersInRole> LayDanhSachTheoRoleID(Guid roleID)
        {
            UsersInRoleDAO udao = new UsersInRoleDAO();
            return udao.LayDanhSachTheoRoleID(roleID);
        }

        /************************************************************************************************************        *                          coder: TRAN KINH LY 
         ***********************************************************************************************************/



    }
}
